project(OldClient)

file(GLOB SourceCode "src/*.cpp" "src/*.h")

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(USE_THRIFT_IPC 1)

configure_file(src/Config.h.in inc/Config.h)

find_package(fmt REQUIRED)
find_package(oatpp 1.3.0 REQUIRED)
find_package(oatpp-websocket 1.3.0 REQUIRED)
find_package(spdlog REQUIRED)

include_directories(../Thrift/Client)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/inc)

link_libraries(oatpp::oatpp oatpp::oatpp-websocket fmt pthread spdlog::spdlog
               ClientIPC)

add_executable(OldClient run/OldClient.cpp ${SourceCode})

if(NOT (${DISABLE_TEST} MATCHES "On"))
  add_executable(ImageStream_test run/ImageStreamTest.cpp ${SourceCode})
endif()

install(TARGETS OldClient DESTINATION bin)
